var webpack = require('webpack');
module.exports = {
    entry: "./src/main.js",
    output: {
        filename: "build/build.js",
    },
    module: {
        loaders: [
            //.css 文件使用 style-loader 和 css-loader 来处理
            { test: /\.css$/, loader: "style!css" },
            { test: /\.less$/, loader: "style!css!less" },
            //.js 文件使用 jsx-loader 来编译处理
            { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' },
            {test: /.(png|jpg)$/, loader: 'url-loader?limit=8192'},
            { test: /\.(ttf|eot|woff|woff2|otf|svg)/, loader: 'file-loader?name=../fonts/[name].[ext]' }
        ]
    },
    resolve: {
        extensions: ['', '.js', '.jsx'],
        alias: {
            a : 'js/assets/a.js',  // 后面直接引用 require(“a”)即可引用到模块
            b : 'js/assets/b.js',
            c : 'js/assets/c.js'
        }
    },
    plugins: [

    ]
};

